#include <bits/stdc++.h>

using namespace std;

string convert(string s, int numRows);

int main()
{
	return 0;
}

string convert(string s, int numRows)
{
	if (numRows == 1) return s;

	vector<string> aux(numRows);
	int idx = 0, row = 0, len = s.size();

	while (idx < len) {
		while (idx < len && row < numRows) aux[row++] += s[idx++];
		if (idx == len) break;

		row -= 2;
		while (idx < len && row >= 0) aux[row--] += s[idx++];

		row += 2;
	}

	string res;
	for (auto str : aux) res += str;
	return res;
}
